Release 10.1A: OpenEdge Development:
Progress 4GL Handbook


Populating a selection list dynamically

GetListItems uses the table list and query to ask the getQuery procedure to generate a dynamic query for it. It then gets the field values for each record in the query (all the fields in the Customer table in this case), and uses them to populate the selection list:

  /* Add this row to the list box */ 
        ihListBox:ADD-LAST(cLabel,cValue). 

Finally, it makes the first item in the list the selected item:

  /* Set the value of the list-box to be the first entry in the list */ 
  IF ihListBox:NUM-ITEMS > 0 THEN 
     ihListBox:SCREEN-VALUE = ihListBox:ENTRY(1). 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095